﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiXiu.Model.Vod
{
    public class MyVideoModel
    {
        /// <summary>
        /// 视频Id
        /// </summary>
        public string VideoId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Headline { get; set; }

        /// <summary>
        /// 封面地址
        /// </summary>
        public string CoverURL { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public string Status { 
            get { return status; } 
            set {
                switch (value)
                {
                    case "0":
                        status = "未知";
                        break;
                    case "1":
                        status = "上传中";
                        break;
                    case "2":
                        status = "上传失败";
                        break;
                    case "3":
                        status = "上传完成";
                        break;
                    case "4":
                        status = "转码中";
                        break;
                    case "5":
                        status = "转码失败";
                        break;
                    case "6":
                        status = "屏蔽";
                        break;
                    case "7":
                        status = "正常";
                        break;
                    default:
                        status = "状态异常";
                        break;
                }
            } }
        private string status;

        public MyVideoModel(TBVideos video) 
        {
            VideoId = video.VideoId;
            Headline = video.Headline;
            CoverURL = video.CoverURL;
            Status = video.Status.HasValue ? video.Status.ToString() : "";
        }
    }
}
